package com.doyens.item.api;

import com.doyens.item.pojo.SpecGroup;
import com.doyens.item.pojo.SpecParam;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface SpecificationApi {

    @GetMapping("spec/params")
    public List<SpecParam> queryParams(
            @RequestParam(value = "gid",required = false) Long gid,
            @RequestParam(value = "cid",required = false) Long cid,
            @RequestParam(value = "generic",required = false) Boolean generic,
            @RequestParam(value = "searching",required = false) Boolean searching
    );

    //根据分类id查询规格组
    @GetMapping("spec/group/param/{cid}")
    public List<SpecGroup> queryGroupWithParam(@PathVariable("cid") Long cid);
}
